/*** Eclipse Class Decompiler plugin, copyright (c) 2016 Chen Chao (cnfree2000@hotmail.com) ***/
package com.guoxue.dao.impl;

import com.guoxue.dao.ICoinsDao;
import com.guoxue.domain.CoinsVo;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public class CoinsDaoImpl extends BaseDaoImpl<CoinsVo> implements ICoinsDao {
	
	public CoinsVo getCoinsById(int id) {
		return  get("from CoinsVo c where c.id = ?", new Object[] { id});
	}

	public List<CoinsVo> getCoinsList() {
		return find("from CoinsVo c");
	}

	@Override
	public void saveCoins(CoinsVo c) {
		saveOrUpdate(c);
	}

	@Override
	public void deleteCoins(Integer id) {
		executeHql("DELETE FROM CoinsVo c WHERE c.id = ?", new Object[] {id});
	}
}